package com.eblacorp.archive.service;

import java.beans.IntrospectionException;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;
import java.util.List;

import com.eblacorp.archive.domain.fn.TransactionFile;
import com.eblacorp.archive.exceptions.NoAttachedFnDocument;
import com.eblacorp.archive.exceptions.NotFnDocumentException;
import com.eblacorp.archive.exceptions.NullValueException;

public interface TransactionFileService {
	public List<TransactionFile> search(TransactionFile transactionFile, Date transactionDateFrom,
			Date transactionDateTo,Integer startPage, Integer pageSize, boolean withDocument)throws IllegalArgumentException, NotFnDocumentException, IntrospectionException, IllegalAccessException, InvocationTargetException, InstantiationException ;
	public TransactionFile addNewDocument(TransactionFile transactionFile, File file) throws IllegalArgumentException, NotFnDocumentException, IntrospectionException, IllegalAccessException, InvocationTargetException, InstantiationException, NullValueException, IOException;
	public void delete(TransactionFile transactionFile, boolean allVersion) throws IllegalArgumentException, IntrospectionException, IllegalAccessException, InvocationTargetException, NullValueException;
	public TransactionFile updateContent(TransactionFile transactionFile, File file) throws IllegalArgumentException, IntrospectionException, IllegalAccessException, InvocationTargetException, NullValueException, IOException;
	public TransactionFile updateProperties(TransactionFile transactionFile) throws IllegalArgumentException, IntrospectionException, IllegalAccessException, InvocationTargetException, NullValueException, IOException;
	public byte[] download(TransactionFile transactionFile) throws NoAttachedFnDocument, IOException;
	public String getViewerUrl(TransactionFile transactionFile);
}
